<template>
  <div class="carousel">
    <el-carousel :interval="5000" arrow="always">
      <el-carousel-item v-for="item in list" :key="item.id">
        <!-- <h3>{{ item }}</h3> -->
        <img :src="item.url" alt="" />
      </el-carousel-item>
    </el-carousel>
  </div>
</template>

<script>
export default {
  name: "Carousel",
  data() {
    return {
      list: [
        {
          id: 1,
          url: require("../../assets/images/1_509_509.jpg"),
        },
        {
          id: 2,
          url: require("../../assets/images/2_509_509.jpeg"),
        },
        {
          id: 3,
          url: require("../../assets/images/3_509_509.jpg"),
        },
        {
          id: 4,
          url: require("../../assets/images/4_509_509.jpg"),
        },
        {
          id: 5,
          url: require("../../assets/images/5_509_509.jpg"),
        },
      ],
    };
  },
};
</script>

<style lang="less" scoped>
.carousel {
  float: right;
  width: 400px;
  margin-top: 50px;
  margin-left: 20px;
}
</style>